The following are practice problems where there is an unorganized or inefficient code. Efficiency and organization are needed to becoming a good programmer. Fix the problem. The answers (although they may not match your's exactly) are at the bottom.

  1. if (eugene.canCatch())
    {
       if (pass.isAccurate())
       {
          return touchdown;
       }
    }
    else
       return turnover;








  1. if (eugene.canCatch() && pass.isAccurate())    // if both return true
       return touchdown;                // it returns touchdown, which is 7
    else
       return turnover;                // if either return false, it returns turnover, which is -7